/*
 * Copyright (c)  2015~2020, xforceplus
 * All rights reserved.
 * Project:datacare-orm
 * Id: PageDialect.java   2020-10-07 22-55-34
 * Author: Evan
 */
package cn.datacare.orm.dialect;

import java.util.Map;

/**
 * <p>
 * Title: 分页方言
 * </p>
 * <p>
 * Description: 分页方言
 * </p>
 * <p>
 * Copyright: 2015~2020
 * </p>
 * <p>
 * Company/Department: xforceplus
 * </p>
 *
 * @author Evan
 * <b>Creation Time:</b> 2020-10-07 22-55-34
 * @since V1.0
 */
public interface PageDialect {
    /***
     * 分页查询
     * @param toString
     * @param startRow
     * @param pageSize
     * @return int
     */
    String getPageSQLStatement(String toString, long startRow, long pageSize);


    /***
     * 设置PageSQL
     * @param sql
     * @return
     */
    String getPageSQL(String sql);

    /**
     * 初始分页参数
     * @param params 参数
     * @param start 开始
     * @param size 大小
     */
    void initPageParams(Map<String, Object> params, long start, long size);
}
